<template>
  <div class="">
    <p>1.平移translate，旋转rotate，缩放scale</p>
    <div id="box1"></div>

    <p>1.1例子</p>
    <div id="box2">
      <div>
        <span>350小时</span>
        <p>Enchanted</p>
      </div>
      <div>
         <span>350小时</span>
         <p>Enchanted</p>
      </div>
      <div>
         <span>350小时</span>
         <p>Enchanted</p>
      </div>
      <div>
         <span>350小时</span>
         <p>Enchanted</p>
      </div>
    </div>

    <p>2.transform3D</p>
    <div id="parent">
      <div id="son">

      </div>
    </div>
  </div>
</template>

<script>
export default {
    data() {
        return {

        }
    },
    components:{

    },
    watch:{

    },
    computed:{

    },
    created() {

    },
    mounted() {

    },
    methods: {
        
    }
}
</script>

<style scoped>
p {
  font-size: 30px;
}
#box1 {
  width: 200px;
  height: 200px;
  border: 1px solid red;
  transition: 2s;
}
#box1:hover {
   box-shadow: 0px 0px 5px 5px red;
  /* 平移 两个参数 "水平" "垂直"*/
  /* transform: translate(30px); */
  /* 旋转 */
  /* transform: rotate(60deg); */
  /* 缩放 两个参数 "水平" "垂直" 一个参数的话就统一*/
  /* transform:scale(0.5,1.5); */
  /* 倾斜 两个参数 用的不是很多*/
  /* transform: skew(40deg,30deg); */
}


/* 例子 */
#box2 {
  width: 650px;
  height: 112px;
  border: 1px solid #ccc;
  transition: 0.5s;
}
#box2>div {
  float: left;
  margin-left: 25px;
  margin-top: 10px;
}
#box2:hover {
   transform:scale(0.5);
}



/* transform3D */
#parent {
  width: 200px;
  height: 200px;
  background-color: pink;
  perspective: 600px;
}
/* 
  perspective 透视(呈现出的是伪3D "站在哪儿看")
*/
#son {
  width: 100%;
  height: 100%;
  /* background-color: blue; */
  background: url('../../../../assets/avatar/avatar.jpg');
  transform: translateZ(-200px);
  transition: 3s;
}
#son:hover {
  /* transform:scaleZ(-1) */
  transform: rotateZ(30deg);
}
</style>